{extend name="public/base" /}
{block name="title"}首页{/block}
{block name="body"}
<div class="ui container">
    <a href="{:url('/admin/article/create')}" class="ui button primary" >添加文章</a>
    <table class="ui table">
        <thead>
        <th>ID</th>
        <th>标题</th>
        <th>添加时间</th>
        <th>修改时间</th>
        <th>操作</th>
        </thead>
        <tbody>
        {foreach $list as $vo}
        <tr>
            <td>{$vo['id']}</td>
            <td>
                <a href="{:url('/article/'.$vo['id'])}" target="_blank">{$vo['title']}</a>
                </td>
            <td>{:date("Y/m/d H:i:s",$vo['create_time'])}</td>
            <td>{:date("Y/m/d H:i:s",$vo['update_time'])}</td>
            <td><a href="{:url('/admin/article/'.$vo['id'].'/edit')}" class="ui button primary small"
            >编辑</a>
                <a href="{:url('/admin/article/'.$vo['id'].'/delete')}" class="ui button orange small"
                onclick="javascript:return confirm('确认删除')"
            >删除</a></td>
        </tr>
        {/foreach}
        </tbody>
    </table>
    {$list->render()}
</div>
{/block}
{block name="footer"}{/block}